import request from '@/utils/request'

/* 公共相關接口 */

export const reqUpload = data => request({url: '/uploadImageWeb', method: 'post', data})

/** 首页数据 */

export const getHomeData = data => request({url: '/getHomeDataWeb', method: 'post', data})

/** 百度ai */

export const ask = data => request({url: '/sendingBaiDuGPTWeb', method: 'post', data})

/** 文件管理相關接口 */

export const editFileCate = data => request({url: '/handleFileSortWeb', method: 'post', data})

export const delFileCate = data => request({url: '/deleteFileSortWeb', method: 'post', data})

export const addFile = data => request({url: '/addFileWeb', method: 'post', data})

export const delFile = data => request({url: '/deleteFileWeb', method: 'post', data})

export const getFileCate = data => request({url: '/getFileSortListWeb', method: 'post', data})

const reqFile = data => request({url: '/getFileListWeb', method: 'post', data})

/* 角色權限相關接口 */

export const getAdminMenus = () => request({url: '/getAdminMenuWeb', method: 'get'})

export const getAllMenus = () => request({url: '/getAllMenuWeb', method: 'post'})

export const getPower = data => request({url: '/getRolePowerWeb', method: 'post', data})

export const addRole = data => request({url: '/addRolePower', method: 'post', data})

export const editRole = data => request({url: '/editRolePower', method: 'post', data})

export const delRole = data => request({url: '/deleteRolePower', method: 'post', data})

const reqRole = data => request({url: '/getRoleListWeb', method: 'post', data})

/** 管理員相關接口 */

export const getAllRole = () => request({url: '/getAllRoleWeb', method: 'post'})

export const addAdmin = data => request({url: '/addAdminWeb', method: 'post', data})

export const editAdmin = data => request({url: '/editAdminWeb', method: 'post', data})

export const delAdmin = data => request({url: '/deleteAdminWeb', method: 'post', data})

const reqAdmin = data => request({url: '/getAdminListWeb', method: 'post', data})

/** 規格分類相關接口 */

export const addSpecs = data => request({url: '/addSpecsSortWeb', method: 'post', data})

export const editSpecs = data => request({url: '/editSpecsSortWeb', method: 'post', data})

export const delSpecs = data => request({url: '/deleteSpecsSortWeb', method: 'post', data})

const reqSpecs = data => request({url: '/getSpecsSortListWeb', method: 'post', data})

/** 產品分類相關接口 */

export const addGoodsCate = data => request({url: '/handleProductSortListWeb', method: 'post', data})

export const delGoodsCate = data => request({url: '/deleteProductSortListWeb', method: 'post', data})

const reqGoodsCate = data => request({url: '/getProductSortListWeb', method: 'post', data})

/** 產品相關接口 */

export const getGoodsCate = () => request({url: '/getAllProductSortWeb', method: 'post'})

export const getGoodsSpace = () => request({url: '/getAllSpecsSortWeb', method: 'post'})

export const addGoods = data => request({url: '/addProductWeb', method: 'post', data})

export const editGoods = data => request({url: '/editProductWeb', method: 'post', data})

export const delGoods = data => request({url: '/deleteProductWeb', method: 'post', data})

const reqGoods = data => request({url: '/getProductListWeb', method: 'post', data})

/** 規格產品相關接口 */

export const addSpecsGoods = data => request({url: '/addProductSpecsKeyWeb', method: 'post', data})

export const editSpecsGoods = data => request({url: '/editProductSpecsWeb', method: 'post', data})

export const getSpecsGoods = data => request({url: '/getProductSpecsWeb', method: 'post', data})

/** 優惠券管理相關 */

export const editCoupon = data => request({url: '/handleCouponListWeb', method: 'post', data})

export const delCoupon = data => request({url: '/deleteCouponWeb', method: 'post', data})

const reqCoupon = data => request({url: '/getCouponListWeb', method: 'post', data})

/** 損耗記錄相關 */

export const getSku = () => request({url: '/getAllProductWeb', method: 'post'})

export const addLoss = data => request({url: '/addWastageRecordListWeb', method: 'post', data})

export const editLoss = data => request({url: '/editWastageRecordListWeb', method: 'post', data})

export const delLoss = data => request({url: '/deleteWastageRecordListWeb', method: 'post', data})

const reqLoss = data => request({url: '/getWastageRecordListWeb', method: 'post', data})

/** 采購記錄相關 */

export const editPurchase = data => request({url: '/handlePurchaseRecordListWeb', method: 'post', data})

export const delPurchase = data => request({url: '/deletePurchaseRecordListWeb', method: 'post', data})

export const emailPurchase = data => request({url: '/purchaseRecordEmailWeb', method: 'post', data})

export const warehousePurchase = data => request({url: '/purchaseWarehouseWeb', method: 'post', data})

const reqPurchase = data => request({url: '/getPurchaseRecordListWeb', method: 'post', data})

/** 會員等級相關 */

export const getLevel = () => request({url: '/getMemberListWeb', method: 'post'})

export const editLevel = data => request({url: '/editMemberListWeb', method: 'post', data})

/** 協議相關 */

export const getClause = () => request({url: '/getClauseWeb', method: 'post'})

export const editClause = data => request({url: '/editClauseWeb', method: 'post', data})

export const getPrivacy = () => request({url: '/getPrivacyWeb', method: 'post'})

export const editPrivacy = data => request({url: '/editPrivacyWeb', method: 'post', data})

/** banner相關 */

export const editBanner = data => request({url: '/handleBannerListWeb', method: 'post', data})

export const delBanner = data => request({url: '/deleteBannerListWeb', method: 'post', data})

const reqBanner = data => request({url: '/getBannerListWeb', method: 'post', data})

/** 常見問題相關 */

export const editFaq = data => request({url: '/handleFaqWeb', method: 'post', data})

export const delFaq = data => request({url: '/deleteFaqWeb', method: 'post', data})

const reqFaq = data => request({url: '/getFaqListWeb', method: 'post', data})

/** 用戶列表相關 */

export const addUser = data => request({url: '/addUserWeb', method: 'post', data})

export const editUser = data => request({url: '/editUserWeb', method: 'post', data})

export const editUserPsd = data => request({url: '/editUserPasswordWeb', method: 'post', data})

export const delUser = data => request({url: '/deleteUserWeb', method: 'post', data})

const reqUser = data => request({url: '/getUserListWeb', method: 'post', data})

/** 店鋪設置相關 */

export const getStore = () => request({url: '/getShopSettingWeb', method: 'post'})

export const editStore = data => request({url: '/editShopSettingWeb', method: 'post', data})

/** 客服設置相關 */

export const editService = data => request({url: '/handleShopServiceWeb', method: 'post', data})

export const delService = data => request({url: '/deleteShopServiceWeb', method: 'post', data})

const reqService = data => request({url: '/getShopServiceListWeb', method: 'post', data})

/** 店鋪推送相關 */

export const getPushShop = () => request({url: '/getShopGeTuiWeb', method: 'post'})

export const editPushShop = data => request({url: '/handleShopGeTuiWeb', method: 'post', data})

/** paypal設置相關 */

export const editPaypal = data => request({url: '/handleShopPayPalWeb', method: 'post', data})

export const delPaypal = data => request({url: '/deleteShopPayPalWeb', method: 'post', data})

const reqPaypal = data => request({url: '/getShopPayPalListWeb', method: 'post', data})

/** Stripe設置相關 */

export const editStripe = data => request({url: '/handleShopStripeWeb', method: 'post', data})

export const delStripe = data => request({url: '/deleteShopStripeWeb', method: 'post', data})

const reqStripe = data => request({url: '/getShopStripeListWeb', method: 'post', data})

/** 系統推送相關 */

export const sendPush = data => request({url: '/pushMessageWeb', method: 'post', data})

export const delPushMsg = data => request({url: '/deletePushMessageWeb', method: 'post', data})

export const getUser = data => request({url: '/getAllUsersWeb', method: 'post', data})

const reqPushMsg = data => request({url: '/getPushMessageListWeb', method: 'post', data})

/** 訂單相關 */

export const getArea = () => request({url: '/getAddressAreaWeb', method: 'post'})

export const addLogistic = data => request({url: '/addOrderLogisticsWeb', method: 'post', data})

export const editAppoTime = data => request({url: '/editOrderTimeWeb', method: 'post', data})

export const completeOrder = data => request({url: '/confirmReceiptWeb', method: 'post', data})

export const confirmPay = data => request({url: '/confirmPaymentWeb', method: 'post', data})

export const delOrder = data => request({url: '/deleteOrderWeb', method: 'post', data})

export const editPaymentat = data => request({url: '/editPaymentTime', method: 'post', data})

export const controlRecord = data => request({url: '/getOrderActivityLogListWeb', method: 'post', data})

export const DlFile = params => request({url: '/generateInvoiceWeb', method: 'get', responseType: 'blob', params})

const reqOrders = data => request({url: '/getOrderListWeb', method: 'post', data})

export const getCalendarOrder = data => request({url: '/getCalendarOrdersWeb', method: 'post', data})

export const getOffUser = data => request({url: '/getAllUsersWeb', method: 'post', data})

export const addOfflineOrder = data => request({url: '/addOfflineOrdersWeb', method: 'post', data})

export const addOrder = data => request({url: '/WebAddOrder', method: 'post', data})

const reqOfflineGoods = data => request({url: '/getAllSortProductWeb', method: 'post', data})

/** 預約排號相關 */

export const editAppoNum = data => request({url: '/handleReservationProjectWeb', method: 'post', data})

export const delAppoNum = data => request({url: '/deleteReservationProjectWeb', method: 'post', data})

const reqAppoNum = data => request({url: '/getReservationProjectWeb', method: 'post', data})

export const editUserNum = data => request({url: '/editUserReservationWeb', method: 'post', data})

export const delUserNum = data => request({url: '/deleteUserReservationWeb', method: 'post', data})

const reqUserNum = data => request({url: '/getUserReservationWeb', method: 'post', data})

/** 評論管理相關 */

export const delComment = data => request({url: '/deleteOrderCommentWeb', method: 'post', data})

const reqComment = data => request({url: '/getOrderCommentListWeb', method: 'post', data})

/** 資訊管理相關 */

export const editNews = data => request({url: '/handleNewsWeb', method: 'post', data})

export const delNews = data => request({url: '/deleteNewsWeb', method: 'post', data})

const reqNews = data => request({url: '/getNewsListWeb', method: 'post', data})

/** 留言管理相關 */

export const delMessage = data => request({url: '/deleteMessageWeb', method: 'post', data})

const reqMessage = data => request({url: '/getMessageListWeb', method: 'post', data})

/** 日志管理相關 */

const reqLoginLog = data => request({url: '/getAdminLogListWeb', method: 'post', data})

export const delActLog = data => request({url: '/deleteActivityLogWeb', method: 'post', data})

const reqActLog = data => request({url: '/getActivityLogListWeb', method: 'post', data})

/** 分析系統管理相關 */

export const getSD = data => request({url: '/getSalesDirectionWeb', method: 'post', data})

const reqOA = data => request({url: '/getOrderAnalysisWeb', method: 'post', data})

const reqUA = data => request({url: '/getUserAnalysisWeb', method: 'post', data})




export default {
  reqFile,

  reqRole,

  reqAdmin,

  reqSpecs,

  reqGoodsCate,

  reqGoods,

  reqCoupon,

  reqLoss,

  reqPurchase,

  reqBanner,

  reqFaq,

  reqUser,

  reqService,

  reqPaypal,

  reqStripe,

  reqPushMsg,

  reqOrders,

  reqOfflineGoods,

  reqAppoNum,

  reqUserNum,

  reqComment,

  reqNews,

  reqMessage,

  reqLoginLog,

  reqActLog,

  reqOA,

  reqUA
}
